
package com.naza.rpc.netty.handler;

import com.naza.rpc.netty.RpcSendHandler;
import com.naza.rpc.serialize.hessian.HessianCodecUtil;
import com.naza.rpc.serialize.hessian.HessianDecoder;
import com.naza.rpc.serialize.hessian.HessianEncoder;
import io.netty.channel.ChannelPipeline;

/**
 * RPC客户端 Hessian 编解码 处理(RpcSendHandler)
 * 
 * @author yl
 */
public class HessianSendHandler implements NazaSendHandler {
    @Override
    public void handle(ChannelPipeline pipeline) {
        HessianCodecUtil util = new HessianCodecUtil();
        pipeline.addLast(new HessianEncoder(util));
        pipeline.addLast(new HessianDecoder(util));
        pipeline.addLast(new RpcSendHandler());
    }
}
